package designMode.abstractFactoryPattern;



/**
 * @ClassName NYPizzaStore
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/24 09:45
 * @Version 1.0
 **/
public class NYPizzaStore extends PizzaStore {

    @Override
    Pizza createPizza(String type) {
        Pizza p = null;
        PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();
        if("cheese".equals(type)){
            p = new CheesePizza(ingredientFactory);
        }
        return p;
    }
}
